<?php
/*
 * @Author: Wulala
 * @Date: 2025-04-15 20:13:41
 * @LastEditTime: 2025-04-16 10:17:57
 * @LastEditors: Wulala
 * @Description: 
 * @FilePath: \yoshop\app\api\controller\notify\Notify.php
 * 可以输入预定的版权声明、个性签名、空行等
 */
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务，帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2024 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件，不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);

namespace app\api\controller\notify;

use think\response\Json;
use app\api\controller\Controller;
use app\common\model\OrderCash as OrderCashModel;


/**
 * 积分平台回调
 * Class Category
 * @package app\api\controller\article
 */
class Notify extends Controller
{

    // 发货结果通知
    public function sendGoods(): Json
    {
       // 获取列表数据
       $param=$this->request->param();
       return $this->renderSuccess(compact('list'));
    }

    // 转账结果通知
    public function payCash()
    {
        $param=$this->request->param();
        $data['status']=1;
        $data['pay_num']=$param['pay_num'];
        $data['send_remark']=$param['send_remark'];
        $res=(new OrderCashModel)->where('order_no',$param['order_no'])->update($data);
        if($res){
           return json_encode(['code'=>1,'data'=>[],'msg'=>'成功']);
        }else{
           return json_encode(['code'=>0,'data'=>[],'msg'=>'失败']);
        }
    
    }
}